<?php include template("manage_header");?>

<div id="bdw" class="bdw">
<div id="bd" class="cf">
<div id="coupons">
	<div class="dashboard" id="dashboard">
		<ul><?php echo mcurrent_yimamms($selector); ?></ul>
	</div>
    <div id="content" class="coupons-box clear mainwide">
		<div class="box clear">
            <div class="box-top"></div>
            <div class="box-content">
                <div class="head">
                    <h2><?php echo $status; ?>彩信二维码</h2>
					<ul class="filter">
						<li><form method="get">项目ID：<input type="text" class="h-input" name="team_id" value="<?php echo htmlspecialchars($team_id); ?>" >&nbsp;用户：<input type="text" class="h-input" name="uname" value="<?php echo htmlspecialchars($uname); ?>" >&nbsp;订单号：<input type="text" class="h-input" name="order_id" value="<?php echo htmlspecialchars($order_id); ?>" >&nbsp;流水号：<input type="text" class="h-input" name="id" value="<?php echo htmlspecialchars($id); ?>" >&nbsp;<input type="submit" value="筛选" class="formbutton"  style="padding:1px 6px;"/><form></li>
					</ul>
				</div>
                <div class="sect">
					<table id="orders-list" cellspacing="0" cellpadding="0" border="0" class="coupons-table">
					<tr><th width="100">流水号</th><th width="100">订单号</th><th width="420">项目</th><th width="180">用户</th><th width="80" nowrap>截至日期</th><th width="40" nowrap>次数</th><th width="40" nowrap>操作</th></tr>
					<?php if(is_array($yimammses)){foreach($yimammses AS $index=>$one) { ?>
					<tr <?php echo $index%2?'':'class="alt"'; ?> id="order-list-id-<?php echo $one['id']; ?>">
						<td><textarea onfocus="javascript:this.select();"><?php echo $one['id']; ?></textarea><br /><?php if($one['sys_seq']){?><span style="color:red"><?php echo $one['sys_seq']; ?></span><?php } else { ?><span style="color:red"><?php echo $one['msg']; ?></span><?php }?></td>
						<td><?php echo $orders[$one['order_id']]['id']; ?></td>
						<td><?php echo $one['team_id']; ?>&nbsp;(<a class="deal-title" href="/team.php?id=<?php echo $one['team_id']; ?>" target="_blank"><?php echo $teams[$one['team_id']]['product']; ?></a>)</td>
						<td nowrap><?php echo $users[$one['user_id']]['email']; ?><br/><?php echo $users[$one['user_id']]['username']; ?></td>
						<td nowrap><?php echo date('Y-m-d',$one['expire_time']); ?></td>
						<td><?php echo $one['mms']; ?></td>
						<?php if($one['status'] ==0 && $one['expire_time'] >= $daytime){?>
    						<td class="op">
    						<?php if($one['sys_seq']){?>
    							<a href="/ajax/coupon.php?action=resend_yimamms&id=<?php echo $one['id']; ?>" class="ajaxlink">重发</a><br />
    							<a href="/ajax/coupon.php?action=changesend_yimamms_lialog&id=<?php echo $one['id']; ?>" class="ajaxlink">转发</a><br />
    							<a href="/ajax/coupon.php?action=cancel_mms&id=<?php echo $one['id']; ?>" class="ajaxlink" ask="撤消后将不可恢复，确定吗？">撤销</a><br />
    						<?php } else { ?>
    							<a href="/ajax/coupon.php?action=recreate_yimamms&id=<?php echo $one['id']; ?>" class="ajaxlink">重试</a><br />
    						<?php }?>
    						</td>
    					<?php }?>
					</tr>
					<?php }}?>
					<tr><td colspan="7"><?php echo $pagestring; ?></tr>
                    </table>
				</div>
            </div>
            <div class="box-bottom"></div>
        </div>
    </div>
</div>
</div> <!-- bd end -->
</div> <!-- bdw end -->

<?php include template("manage_footer");?>
